FROM jenkins
MAINTAINER tiandong19860806@126.com
USER root
RUN mkdir -p /soft/maven/ && mkdir -p /usr/local/maven && mkdir -p /usr/local/java && \
wget -O /soft/maven/maven-3.5.4.tar.gz  -c https://github.com/apache/maven/archive/maven-3.5.4.tar.gz && \
tar -zxvf /soft/maven/maven-3.5.4.tar.gz -C /soft/maven/

ENV MAVEN_HOME /usr/local/maven
ENV JAVA_HOME  /usr/local/java
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH ${JAVA_HOME}/bin:${MAVEN_HOME}/bin:${PATH}
RUN cp -rf /soft/maven/maven-maven-3.5.4/apache-maven/src/* /usr/local/maven

RUN mkdir -p /usr/local/maven/repository  &&  ln -s /usr/java/jdk1.8.0_171 /usr/local/java